import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:yt_devops/components/gaps.dart';
import 'package:yt_devops/components/text_width.dart';
import 'package:yt_devops/components/yt_text_style.dart';
import 'package:yt_devops/components/my_gesture_detector.dart';
import 'package:yt_devops/resources/str_res_keys.dart';
import 'package:yt_devops/styles/styles.dart';

/**
 *
 * @Description TODO
 * @Author liuer
 * @CreateTime 2024年04月19日 16:39
 */
class ShowFullScreenBtn extends StatelessWidget {
  final Function () onTap;
  const ShowFullScreenBtn({required this.onTap,super.key});

  @override
  Widget build(BuildContext context) {
    double width = TextWidth.calculateTextSize(ResKey.fullScreen.tr,
        ytTextStyle(fontSize: 12,color: Colour.otherTextColor)) + 32;
    return
      MyGestureDetector(onTap: onTap, child: Container(
          margin:
          const EdgeInsets.only(left: 16, right: 16, top: 16),
          // padding: EdgeInsets.only(left: 9.w,right: 9.w),
          height: 26,
          width: width,
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(4),
            color: Colour.backgroundColor,
          ),
          alignment: Alignment.center,
          child: Row(
            crossAxisAlignment: CrossAxisAlignment.center,
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              const Spacer(),
              Text(
                ResKey.fullScreen.tr,
                style: ytTextStyle(
                    fontSize: 12, color: Colour.otherTextColor),
              ),
              Gaps.hGap2,
              Image.asset(
                'assets/images/full_screen.png',
                // width: 24.w,
                // height: 24.h,
              ),
              const Spacer(),
            ],
          )));
  }
}
